home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / tip / ts-crm.tip < prev    next >
Text File  |  1993-09-15  |  3KB  |  117 lines

  1. % This macro source file is from the four volume series
  2. % "TeX in Practice" by Stephan von Bechtolsheim, published
  3. % 1993 by Springer-Verlag, New York.
  4. % Copyright 1993 Stephan von Bechtolsheim.
  5. % No warranty or liability is assumed.
  6. % This macro may be copied freely if no fees other than
  7. % media cost or shipping charges are charged and as long
  8. % as this copyright and the following source code itself
  9. % is not changed. Please see the series for further information.
  10. %
  11. % Version: 1.0
  12. % Date: May 1, 1993
  13. %
  14. %
  15. % This source code is documented in 31.2.11, p. III-607.
  16. % Original source in file "pp2.TEX", starting line 1114.
  17. \wlog{L: "ts-crm.tip" ["pp2.TEX," l. 1114, p. III-607]}%
  18. % This file DOES belong to format "texip."
  19. \InputD{pm-wrc.tip}
  20. \InputD{ts-page2.tip}
  21. \catcode`\@ = 11
  22. \def\PageRef   #1{% 
  23.     \@PageRef{#1}%
  24.     \@PageRefResult
  25.     \@PrintAfterLabel
  26. }
  27. \def\Page      #1{% 
  28.     \PageShortForm~\@PageRef{#1}%
  29.     \@PageRefResult
  30.     \@PrintAfterLabel
  31. }
  32. \def\OnPage #1{%
  33.     \@PageRef{#1}%
  34.     \if@CloseByReference
  35.         on \@PageRefResult\space page%
  36.     \else
  37.         on \PageShortForm~\@PageRefResult
  38.     \fi
  39.     \@PrintAfterLabel
  40. }
  41. \def\AtPage #1{%
  42.     \@PageRef{#1}%
  43.     \if@CloseByReference
  44.         at \@PageRefResult\space page%
  45.     \else
  46.         at \PageShortForm~\@PageRefResult
  47.     \fi
  48.     \@PrintAfterLabel
  49. }
  50. \def\CommaPage #1{%
  51.     \@PageRef{#1}%
  52.     \if@CloseByReference
  53.         \space on \@PageRefResult\space page%
  54.         \@PrintAfterLabel
  55.     \else
  56.         ,\space
  57.         \PageShortForm~\@PageRefResult
  58.         \@PrintAfterLabel
  59.     \fi
  60. }
  61. \def\CommaPageComma{%
  62.     \@PageRef{,}%
  63.     \if@CloseByReference
  64.         \space on \@PageRefResult\space page\space
  65.     \else
  66.         ,\space
  67.         \PageShortForm~\@PageRefResult
  68.         \@PrintAfterLabel
  69.         \space
  70.     \fi
  71. }
  72. \def\PageShortForm{p.}
  73. \def\PagesShortForm{pp.}
  74. \def\see #1#2{% 
  75.     see \@SeeSee{#1}{#2}%
  76. }
  77. \def\See #1#2{% 
  78.     See \@SeeSee{#1}{#2}%
  79. }
  80. \def\@SeeSee #1#2{%
  81.     \SectionRef{#1}%
  82.     \if\StringsEqualConditional{#2}{,}%
  83.         \CommaPageComma
  84.         \let\@SeeSeeEnd = \ignorespaces
  85.     \else
  86.         \CommaPage
  87.         #2%
  88.         \let\@SeeSeeEnd = \relax
  89.     \fi
  90.     \@SeeSeeEnd
  91. }
  92. \def\ChapterRef #1{% 
  93.     Chapter~\Ref{#1}%
  94. }
  95. \def\SectionRef #1{% 
  96.     \Ref{#1}%
  97. }
  98. \def\ItemRef #1{% 
  99.     item~\Ref{#1}%
  100. }
  101. \def\FigRef #1{% 
  102.     Fig.~\Ref{#1}%
  103. }
  104. \def\FigureRef #1{% 
  105.     Figure~\Ref{#1}%
  106. }
  107. \def\TableRef #1{% 
  108.     Table~\Ref{#1}%
  109. }
  110. \def\AppendixRef #1{% 
  111.     Appendix~\Ref{#1}%
  112. }
  113. \def\PagesRef #1#2{% 
  114.     \PagesShortForm~\PageRef{#1}--\PageRef{#2}%
  115. }
  116. \catcode`\@ = 12
  117.